<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">编号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="编号" ng-model="param.data.code" ng-readonly="true" />
					</div>
					<p>不可修改。</p>
				</div>
				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">
						<span style="color: red; text-align: center;">* &nbsp</span>城市名首字母：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="城市名首字母" ng-model="param.data.initial" ng-pattern="/^[A-Z]{2,10}$/" />
					</div>
					<p>必填，不少于两位的大写字母，用于APP端索引，例如城市名为“武汉”那么此处填写WH</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">
						<span style="color: red; text-align: center;">* &nbsp</span>名称：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="名称" ng-model="param.data.name" required/>
					</div>
					<p>必填，唯一不可重复。</p>
				</div>
				<!--				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>省：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="省" ng-model="param.data.province" required/>
					</div>
					<p>必填。</p>
				</div>-->
				<div class="form-group">
					<label class="col-sm-3 control-label">
						<span style="color: red; text-align: center;">* &nbsp</span>省份：</label>
					<div class="col-sm-5">
						<ui-select ng-model="provinceList.selected" theme="bootstrap">
							<ui-select-match placeholder="省份">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="province in provinceList | propsFilter:{name: $select.search}">
								<span ng-bind-html="province.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p ng-if="param.type == 'insert'">省份选择可模糊匹配。</p>
					<p ng-if="param.type == 'update'">当前省份：{{param.data.province}}，选择后修改。</p>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>